import service, { config } from '@/utils/request'

// 新增考核任务
export function addSafeTask(params){
    return service.post('/assessment-task/add',params)
}

//查询考核任务
export function searchSafeTaskList(params){
    return service.post('/assessment-task/list',params)
}

// 任务考核详情
export function searchTaskItem(params){
    return service.post('/assessment-task/detail',params)
}

// 删除任务考核
export function removeTask(id){
    return service.delete(`/assessment-task/delete?id=${id}`)
}

// 根据子id获取父
export function getParent(id){
    return service.get(`/assessment-task/getOne?id=${id}`)
}

// 提交任务考核详情
export function submitTaskItem(params){
    return service.post('/assessment-task/saveTask',params)
}

//根据年度或者季度获取考核标准
export function getBiaoZhun(checkType){
    return service.get(`/safe-performance-parent/performanceByType?checkType=${checkType}`)
}